﻿using System;
using System.Collections.Generic;
using System.Linq;
using KC.Enums.Portal.Offering;

namespace KC.Service.DTO.Constants
{
    public static class ServiceProviderConstants
    {
        #region service constants

        #region 投资平台
        public const string 共赢时贷标的基本属性 = "OPS2015051100003";
        public const string 共赢时贷还款方式 = "OPS2015051100004";
        public const string 共赢时贷上传图片 = "OPS2015051100005";
        public const string 共赢时贷跳转页面 = "OPS2015051100002";
        public const string 私募基金产品基本属性 = "OPS2015051100006";
        public const string 私募基金上传图片 = "OPS2015051100008";

        public const string 银行基金产品基本属性 = "OPS2016031600001";
        public const string 银行基金产品上传图片 = "OPS2016031600002";
        public const string 保险类理财的基本属性 = "OPS2016031600003";
        public const string 保险类理财产品类型 = "OPS2016031600004";
        #endregion

        #region 融资性产品
        public const string 融资性产品业务范围 = "OPS2015051100012";
        public const string 融资性产品融资金额 = "OPS2015051100013";
        public const string 融资性产品融资期限 = "OPS2015051100016";
        public const string 融资性产品融资利率 = "OPS2015051100017";
        public const string 融资性产品还款方式 = "OPS2015051100018";
        public const string 融资性产品费用范围 = "OPS2015051100019";
        public const string 融资性产品扩展属性 = "OPS2015051100021";
        public const string 融资性产品上传图片 = "OPS2015051100022";
        public const string 融资性产品产品优势 = "OPS2015051100024";
        public const string 融资性产品申请资料清单 = "OPS2015051100025";
        public const string 融资性产品服务提供商 = "OPS2015051100028";
        #endregion

        #region 供应类产品
        public const string 供应类产品业务区域 = "OPS2015051100029";
        public const string 供应类产品产品报价单价 = "OPS2015051100031";
        public const string 供应类产品产品报价阶梯 = "OPS2015051100032";
        public const string 供应类产品产品报价范围 = "OPS2015051100033";
        public const string 供应类产品物流 = "OPS2015051100034";
        public const string 供应类产品发票类型 = "OPS2015051100035";
        public const string 供应类产品支付方式 = "OPS2015051100036";  //移除
        public const string 供应类产品产品规格 = "OPS2015051100040";
        public const string 供应类产品上传图片 = "OPS2015051100037";
        public const string 供应类产品商业承兑汇票期限 = "OPS2015051100038"; //移除
        public const string 供应类产品信用额度提供商 = "OPS2015051100039";  //移除
        public const string 供应类产品产品优势 = "OPS2015070100001";  //移除
        public const string 供应类产品产品提供方 = "OPS2015112300001";//beta
        public const string 供应类产品现金支付 = "OPS2015102100001";//beta
        public const string 供应类产品赊销支付 = "OPS2015102100002";//beta 移除
        public const string 供应类产品第三方支付 = "OPS2015120800002";//beta 移除

        public const string 供应类产品融资租赁支付 = "OPS2016040100002";
        public const string 供应类产品供应链分期支付 = "OPS2016040100003";
        public const string 供应类产品银行承兑汇票支付 = "OPS2016040100004";
        public const string 供应类产品商业承兑汇票支付 = "OPS2016040100005";
        public const string 供应类产品店铺赊销支付 = "OPS2016040100006";
        public const string 供应类产品银行支付 = "OPS2016040100007";
        public const string 供应类产品商业保理支付 = "OPS2016040100008";
        public const string 供应类产品小额贷款支付 = "OPS2016040100009";
        public const string 供应类产品保付代理支付 = "OPS2016040100010";
        public const string Payment = "Payment";
        #endregion

        #region 采购需求 未用
        public const string 采购需求基本属性 = "OPS2015051100043";
        public const string 采购需求描述 = "OPS2015051100044";
        public const string 采购需求上传图片 = "OPS2015051100045";
        public const string 采购需求针对行业 = "OPS2015051100046";
        #endregion

        #region 融资类抵押物产品属性
        public const string 应收账款基础资料 = "OPS2015091500011";
        public const string 应收账款第三方债务人类型 = "OPS2015091500012";
        public const string 应收账款质押方式 = "OPS2015091500013";
        public const string 应收账款结算方式 = "OPS2015091500014";
        public const string 应收账款账龄 = "OPS2015091500015";

        public const string 房产基础资料 = "OPS2015091500021";
        public const string 房产类型 = "OPS2015091500022";

        public const string 设备基础资料 = "OPS2015091500031";
        public const string 设备类型 = "OPS2015091500032";

        public const string 存货基础资料 = "OPS2015091500041";
        public const string 存货类型 = "OPS2015091500042";

        public const string 信用证基础资料 = "OPS2015091500051";
        public const string 信用证类型 = "OPS2015091500052";

        public const string 商业承兑汇票基础资料 = "OPS2015091500061";
        public const string 商业承兑汇票质押方式 = "OPS2015091500062";
        public const string 商业承兑汇票期限 = "OPS2015091500063";

        public const string 银行承兑汇票基础资料 = "OPS2015091500071";
        public const string 银行承兑汇票质押方式 = "OPS2015091500072";
        public const string 银行承兑汇票期限 = "OPS2015091500073";

        public const string 其他融资类型基础资料 = "OPS2015091500091";
        #endregion

        #region 企业信息化服务
        public const string 企业信息化服务基础资料 = "OPS2015102600001";
        public const string 企业信息化服务功能说明 = "OPS2015102600002";
        public const string 企业信息化服务计价信息 = "OPS2015102600003";
        #endregion

        #endregion

        #region service attribute constants
        #region 投资平台
        public const string Investment_起投金额 = "起投金额（万元）";
        public const string Investment_年化收益 = "年化收益";
        public const string Investment_投资期限 = "投资期限";
        public const string Investment_发布日期 = "发布日期";
        public const string Investment_截止日期 = "截止日期";

        public const string Insurance_保障期限 = "保障期限";
        public const string Insurance_保险公司 = "保险公司";
        public const string Insurance_发布日期 = "发布日期";
        public const string Insurance_截止日期 = "截止日期";
        #endregion

        #region 供应类产品
        public const string CityList_是否排除 = "是否排除";
        public const string CityList_城市列表 = "城市列表";

        public const string Range_最小值 = "最小值";
        public const string Range_最大值 = "最大值";
        public const string Range_单位 = "单位";

        public const string ImageUpload_图片名称 = "图片名称";
        public const string ImageUpload_图片地址 = "图片地址";

        public const string PriceRange_最小值 = "最小值";
        public const string PriceRange_最大值 = "最大值";
        public const string PriceRange_单位 = "单位";
        public const string PriceRange_单价 = "单价";

        public const string ServiceProviderList_银行 = "银行";
        public const string ServiceProviderList_支行 = "支行";

        public const string IndustryClassfication_行业 = "行业";
        public const string IndustryClassfication_子行业 = "子行业";

        public const string PaymentInfo_Select = "select";
        public const string PaymentInfo_PSelect = "pSelect";
        #endregion

        #region 融资产品
        #region 资料清单
        public const string FileUpload_文档名称 = "文档名称";
        public const string FileUpload_文档描述 = "文档描述";
        public const string FileUpload_分类 = "分类";
        public const string FileUpload_后台系统备注 = "后台系统备注";
        public const string FileUpload_是否有模板 = "是否有模板";
        public const string FileUpload_模板下载地址 = "模板下载地址";
        public const string FileUpload_是否可复用 = "是否可复用";
        public const string FileUpload_是否财务报表 = "是否财务报表";
        #endregion

        #region 融资类产品通用属性
        public const string Common_抵押物价值 = "抵押物价值";
        public const string Common_抵押率 = "抵押率";
        public const string Common_是否确认 = "是否确认";
        public const string Common_计算信用额度 = "计算信用额度";
        public const string Common_客户经理估值 = "客户经理估值";
        public const string Common_产品经理估值 = "产品经理估值";
        public const string Common_银行授信额度 = "银行授信额度";
        #endregion

        #region 应收账款
        public const string AccountsReceivables_应收账款基础资料_第三方债务人ID = "第三方债务人ID";
        public const string AccountsReceivables_应收账款基础资料_第三方债务人 = "第三方债务人";
        public const string AccountsReceivables_应收账款基础资料_应收账款金额 = "应收账款金额（元）";

        public const string AccountsReceivables_第三方债务人类型_全球500强 = "全球500强";
        public const string AccountsReceivables_第三方债务人类型_主板上市企业 = "主板上市企业";
        public const string AccountsReceivables_第三方债务人类型_国企 = "国企";
        public const string AccountsReceivables_第三方债务人类型_中小板创业板上市企业 = "中小板、创业板上市企业";
        public const string AccountsReceivables_第三方债务人类型_非上市公司 = "非上市公司";
        public const string AccountsReceivables_第三方债务人类型_深圳市大陆之星供应链管理有限公司 = "深圳市大陆之星供应链管理有限公司";
        public const string AccountsReceivables_第三方债务人类型_财富共赢融资租赁深圳有限公司 = "财富共赢融资租赁（深圳）有限公司";

        public const string AccountsReceivables_应收账款账龄_1个月 = "1个月";
        public const string AccountsReceivables_应收账款账龄_2个月 = "2个月";
        public const string AccountsReceivables_应收账款账龄_3个月 = "3个月";
        public const string AccountsReceivables_应收账款账龄_4个月 = "4个月";
        public const string AccountsReceivables_应收账款账龄_5个月 = "5个月";
        public const string AccountsReceivables_应收账款账龄_6个月 = "6个月";

        public const string AccountsReceivables_应收账款质押方式_应收账款转让 = "应收账款转让";
        public const string AccountsReceivables_应收账款质押方式_应收账款质押 = "应收账款质押";

        public const string AccountsReceivables_应收账款结算方式_现金 = "现金";
        public const string AccountsReceivables_应收账款结算方式_商业承兑汇票 = "商业承兑汇票";
        public const string AccountsReceivables_应收账款结算方式_银行承兑汇票 = "银行承兑汇票";
        public const string AccountsReceivables_应收账款结算方式_信用证 = "信用证";
        #endregion

        #region 房产
        public const string HousePropertys_房产类型_住宅 = "住宅（普通住房，公寓，别墅）";
        public const string HousePropertys_房产类型_商业房产 = "商业房产（商铺，写字楼，酒店，饭店等）";
        public const string HousePropertys_房产类型_工业房产 = "工业房产（产房，仓库等）";

        public const string HousePropertys_房产基础资料_房产所在省份 = "房产所在省份";
        public const string HousePropertys_房产基础资料_房产所有人 = "房产所有人";
        public const string HousePropertys_房产基础资料_房产评估金额 = "房产评估金额（元）";
        #endregion

        #region 设备
        public const string Equipments_设备类型_生产设备 = "生产设备";
        public const string Equipments_设备类型_医疗设备 = "医疗设备";
        public const string Equipments_设备类型_今日标准设备 = "今日标准设备";

        public const string Equipments_设备基础资料_设备价值 = "设备评估金额（元）";
        #endregion

        #region 存货
        public const string FinishedProducts_存货类型_产成品 = "产成品";
        public const string FinishedProducts_存货类型_原材料 = "原材料";
        public const string FinishedProducts_存货基础资料_存货价值 = "存货评估金额（元）";
        #endregion

        #region 信用证
        public const string LetterOfCredits_信用证基础资料_信用证金额 = "信用证金额（元）";
        public const string LetterOfCredits_信用证基础资料_开证行所属国家 = "开证行所属国家";

        public const string LetterOfCredits_信用证类型_即期信用证 = "即期信用证";
        public const string LetterOfCredits_信用证类型_远期信用证 = "远期信用证";
        #endregion

        #region 商业承兑汇票
        public const string TradeAcceptances_商业承兑汇票基础资料_开证行 = "开证行";
        public const string TradeAcceptances_商业承兑汇票基础资料_承兑人 = "承兑人";
        public const string TradeAcceptances_商业承兑汇票基础资料_商业承兑汇票金额 = "商业承兑汇票金额（元）";

        public const string TradeAcceptances_汇票期限_1个月 = "1个月";
        public const string TradeAcceptances_汇票期限_2个月 = "2个月";
        public const string TradeAcceptances_汇票期限_3个月 = "3个月";
        public const string TradeAcceptances_汇票期限_4个月 = "4个月";
        public const string TradeAcceptances_汇票期限_5个月 = "5个月";
        public const string TradeAcceptances_汇票期限_6个月 = "6个月";
        public const string TradeAcceptances_汇票期限_7个月 = "7个月";
        public const string TradeAcceptances_汇票期限_8个月 = "8个月";
        public const string TradeAcceptances_汇票期限_9个月 = "9个月";
        public const string TradeAcceptances_汇票期限_10个月 = "10个月";
        public const string TradeAcceptances_汇票期限_11个月 = "11个月";
        public const string TradeAcceptances_汇票期限_12个月 = "12个月";

        public const string TradeAcceptances_商业承兑汇票质押方式_转让 = "转让";
        public const string TradeAcceptances_商业承兑汇票质押方式_质押 = "质押";
        #endregion

        #region 银行承兑汇票
        public const string BankAcceptances_银行承兑汇票基础资料_开证行 = "开证行";
        public const string BankAcceptances_银行承兑汇票基础资料_承兑人 = "承兑人";
        public const string BankAcceptances_银行承兑汇票基础资料_银行承兑汇票金额 = "银行承兑汇票金额（元）";

        public const string BankAcceptances_汇票期限_1个月 = "1个月";
        public const string BankAcceptances_汇票期限_2个月 = "2个月";
        public const string BankAcceptances_汇票期限_3个月 = "3个月";
        public const string BankAcceptances_汇票期限_4个月 = "4个月";
        public const string BankAcceptances_汇票期限_5个月 = "5个月";
        public const string BankAcceptances_汇票期限_6个月 = "6个月";
        public const string BankAcceptances_汇票期限_7个月 = "7个月";
        public const string BankAcceptances_汇票期限_8个月 = "8个月";
        public const string BankAcceptances_汇票期限_9个月 = "9个月";
        public const string BankAcceptances_汇票期限_10个月 = "10个月";
        public const string BankAcceptances_汇票期限_11个月 = "11个月";
        public const string BankAcceptances_汇票期限_12个月 = "12个月";

        public const string BankAcceptances_银行承兑汇票质押方式_转让 = "转让";
        public const string BankAcceptances_银行承兑汇票质押方式_质押 = "质押";
        #endregion

        #region 其他
        public const string Other_其他基础资料_金额 = "金额（元）";
        public const string Other_其他基础资料_抵押物名称 = "抵押物名称";
        public const string Other_其他基础资料_备注 = "备注";
        #endregion
        #endregion

        #region 企业信息化服务
        public const string It_企业信息化服务_企业应用ID = "企业应用ID";
        public const string It_企业信息化服务_企业应用名称 = "企业应用名称";
        public const string It_企业信息化服务_企业应用主域名 = "企业应用主域名";
        public const string It_企业信息化服务_企业应用过期时间 = "企业应用过期时间";

        public const string It_企业信息化服务功能说明_功能ID = "功能ID";
        public const string It_企业信息化服务功能说明_功能名称 = "功能名称";
        public const string It_企业信息化服务功能说明_功能描述 = "功能描述";
        public const string It_企业信息化服务功能说明_功能价格 = "功能价格";
        public const string It_企业信息化服务功能说明_子功能列表 = "子功能列表";
        public const string It_企业信息化服务功能说明_是否免费 = "是否免费";
        public const string It_企业信息化服务功能说明_是否开通 = "是否开通";
        public const string It_企业信息化服务功能说明_过期时间 = "过期时间";

        public const string It_企业信息化服务计价信息_名称 = "名称";
        public const string It_企业信息化服务计价信息_价格 = "价格";
        public const string It_企业信息化服务计价信息_计费单位 = "价格周期（按月计价）";
        public const string It_企业信息化服务计价信息_价格说明 = "价格说明";
        public const string It_企业信息化服务计价信息_价格折扣率 = "价格折扣率";
        public const string It_企业信息化服务计价信息_积分兑换率 = "积分兑换率";
        public const string It_企业信息化服务计价信息_积分使用说明 = "积分使用说明";
        public const string It_企业信息化服务计价信息_积分过期时间 = "积分过期时间（按月延期）";
        
        #endregion

        #endregion

        private static Dictionary<Framework.Base.OfferingType, List<ServiceType>> serviceProvider = new Dictionary<Framework.Base.OfferingType, List<ServiceType>>();

        private static Dictionary<ServiceDataType, List<string>> serviceProviderAttributes = new Dictionary<ServiceDataType, List<string>>();

        static ServiceProviderConstants()
        {
            serviceProviderAttributes.Add(ServiceDataType.CityList, new List<string>() { CityList_是否排除, CityList_城市列表 });
            serviceProviderAttributes.Add(ServiceDataType.Range, new List<string>() { Range_最小值, Range_最大值, Range_单位 });
            serviceProviderAttributes.Add(ServiceDataType.ImageUpload, new List<string>() { ImageUpload_图片名称, ImageUpload_图片地址 });
            serviceProviderAttributes.Add(ServiceDataType.FileUpload, new List<string>() { FileUpload_文档名称, FileUpload_文档描述, FileUpload_分类, FileUpload_后台系统备注, FileUpload_是否有模板, FileUpload_模板下载地址, FileUpload_是否可复用, FileUpload_是否财务报表 });
            serviceProviderAttributes.Add(ServiceDataType.PriceRange, new List<string>() { PriceRange_最小值, PriceRange_最大值, PriceRange_单位, PriceRange_单价 });
            serviceProviderAttributes.Add(ServiceDataType.ServiceProviderList, new List<string>() { ServiceProviderList_银行, ServiceProviderList_支行 });
            serviceProviderAttributes.Add(ServiceDataType.IndustryClassfication, new List<string>() { IndustryClassfication_行业, IndustryClassfication_子行业 });

            //serviceProviderAttributes.Add(ServiceDataType.AccountsReceivables, new List<string>() { AccountsReceivables_第三方债务人类型 , AccountsReceivables_第三方债务人ID, AccountsReceivables_第三方债务人, AccountsReceivables_应收账款质押方式, AccountsReceivables_应收账款金额,AccountsReceivables_应收账款账龄, AccountsReceivables_结算方式, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
            //serviceProviderAttributes.Add(ServiceDataType.HousePropertys, new List<string>() { HousePropertys_房产类型, HousePropertys_房产所在省份, HousePropertys_房产所有人, HousePropertys_房产评估金额, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
            //serviceProviderAttributes.Add(ServiceDataType.Equipments, new List<string>() { Equipments_设备类型, Equipments_设备价值, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
            //serviceProviderAttributes.Add(ServiceDataType.FinishedProducts, new List<string>() { FinishedProducts_产成品类型, FinishedProducts_产成品价值, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
            //serviceProviderAttributes.Add(ServiceDataType.LetterOfCredits, new List<string>() { LetterOfCredits_信用证类型, LetterOfCredits_信用证金额, LetterOfCredits_开证行所属国家, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
            //serviceProviderAttributes.Add(ServiceDataType.TradeAcceptances, new List<string>() { TradeAcceptances_汇票期限, TradeAcceptances_商业承兑汇票质押方式, TradeAcceptances_商业承兑汇票金额, TradeAcceptances_开证行, TradeAcceptances_承兑人, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
            //serviceProviderAttributes.Add(ServiceDataType.BankAcceptances, new List<string>() { BankAcceptances_汇票期限, BankAcceptances_开证行, BankAcceptances_承兑人, BankAcceptances_银行承兑汇票质押方式, BankAcceptances_银行承兑汇票金额, Common_抵押率, Common_是否确认, Common_计算信用额度, Common_客户经理估值, Common_产品经理估值, Common_银行授信额度 });
        }

        #region ServiceProviderAttribute
        public static Dictionary<ServiceDataType, List<string>> GetServiceProviderAttributeKeys()
        {
            return serviceProviderAttributes;
        }

        public static List<string> GetProviderAttributeKeysByServiceDataType(int providerId, ServiceDataType type)
        {
            var dicProvider = serviceProviderAttributes.LastOrDefault(s => s.Key == type);

            return dicProvider.Value;
        }

        //public static List<ServiceProviderAttribute> GetProviderAttributesByServiceDataType(ServiceProvider provider, ServiceDataType type)
        //{
        //    var readProviders = GetCannotEditServiceProviderList();
        //    if (!readProviders.Contains(type))
        //        throw new ArgumentException(string.Format("不支持ServiceDataType：{0}", type.GetType().FullName), "type");

        //    var attributes = new List<ServiceProviderAttribute>();
        //    switch (type)
        //    {
        //        case ServiceDataType.CityList:
        //            #region CityList
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Bool,
        //                Name = CityList_是否排除,
        //                Value = false.ToString()
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = CityList_城市列表,
        //            });
        //            #endregion

        //            break;
        //        case ServiceDataType.Range:
        //            #region Range
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Decimal,
        //                Name = Range_最小值
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Decimal,
        //                Name = Range_最大值,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = Range_单位,
        //            });
        //            #endregion

        //            break;
        //        case ServiceDataType.ImageUpload:
        //            #region ImageUpload
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = ImageUpload_图片名称
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = ImageUpload_图片地址,
        //            });
        //            #endregion

        //            break;
        //        case ServiceDataType.FileUpload:
        //            #region FileUpload
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = FileUpload_文档名称
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = FileUpload_文档描述,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = FileUpload_分类,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = FileUpload_后台系统备注,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Bool,
        //                Name = FileUpload_是否有模板
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = FileUpload_模板下载地址,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Bool,
        //                Name = FileUpload_是否可复用
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Bool,
        //                Name = FileUpload_是否财务报表
        //            });
        //            #endregion

        //            break;
        //        case ServiceDataType.PriceRange:
        //            #region PriceRange
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Decimal,
        //                Name = PriceRange_最小值
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.Decimal,
        //                Name = PriceRange_最大值,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = PriceRange_单位,
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = PriceRange_单价,
        //            });
        //            #endregion

        //            break;
        //        case ServiceDataType.ServiceProviderList:
        //            #region ServiceProviderList
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = ServiceProviderList_银行
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = ServiceProviderList_支行,
        //            });
        //            #endregion

        //            break;
        //        case ServiceDataType.IndustryClassfication:
        //            #region IndustryClassfication
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = IndustryClassfication_行业
        //            });
        //            attributes.Add(new ServiceProviderAttribute()
        //            {
        //                ServiceProvider = provider,
        //                DataType = AttributeDataType.String,
        //                Name = IndustryClassfication_子行业,
        //            });
        //            #endregion

        //            break;
        //    }

        //    return attributes;
        //}
        #endregion

        #region ServiceDataType
        /// <summary>
        /// 获取可以编辑的ServiceProviderAttribute的ServiceDataType：
        ///     ServiceDataType.TextList,
        ///     ServiceDataType.SingleTextBox,
        ///     ServiceDataType.DropdowList,
        ///     ServiceDataType.ComboxList,
        ///     ServiceDataType.TextArea,
        /// </summary>
        /// <returns></returns>
        public static List<ServiceDataType> GetCanEditServiceProviderList()
        {
            return new List<ServiceDataType>()
            {
                ServiceDataType.TextList,
                ServiceDataType.DropdownList,
                ServiceDataType.CheckBoxList,
                ServiceDataType.TextArea,
                ServiceDataType.PaymentInfo,
            };
        }

        /// <summary>
        /// 获取不可以编辑的ServiceProviderAttribute的ServiceDataType
        ///        ServiceDataType.CityList,
        ///        ServiceDataType.Range,
        ///        ServiceDataType.ImageUpload,
        ///        ServiceDataType.FileUpload,
        ///        ServiceDataType.PriceRange,
        ///        ServiceDataType.ServiceProviderList,
        ///        ServiceDataType.FinancingCollateral,
        /// </summary>
        /// <returns></returns>
        public static List<ServiceDataType> GetCannotEditServiceProviderList()
        {
            return new List<ServiceDataType>()
            {
                ServiceDataType.CityList,
                ServiceDataType.Range,
                ServiceDataType.ImageUpload,
                ServiceDataType.FileUpload,
                ServiceDataType.PriceRange,
                ServiceDataType.ServiceProviderList,
                ServiceDataType.IndustryClassfication,
            };
        }
        #endregion

        #region ServiceType
        /// <summary>
        /// 获取不同产品大类所具有的ServiceType
        /// </summary>
        /// <param name="offeringCategoryId">不同产品大类的Id</param>
        /// <returns></returns>
        public static List<ServiceType> GetServiceTypesByOfferingCategoryId(int offeringCategoryId)
        {
            var list = new List<ServiceType>();
            switch (offeringCategoryId)
            {
                case OfferingCategoryConstants.InvestmentP2BId: //共赢时贷 [OfferingCategories].Id = 10
                    list.Add(ServiceType.InvestmentBasicInfo);
                    list.Add(ServiceType.InvestmentP2B);
                    list.Add(ServiceType.InvestmentP2BImageInfo);
                    break;
                case OfferingCategoryConstants.InvestmentPrivateEquityId: //私募基金 [OfferingCategories].Id = 11
                    list.Add(ServiceType.InvestmentBasicInfo);
                    list.Add(ServiceType.InvestmentPrivateEquity);
                    list.Add(ServiceType.InvestmentPrivateEquityImageInfo);
                    break;
                case OfferingCategoryConstants.ItSoftServiceId:// 软件服务  [OfferingCategories].Id = 15
                case OfferingCategoryConstants.ItValueaddedServiceId:// 增值服务  [OfferingCategories].Id = 16
                    list.Add(ServiceType.ItBasicInfo);
                    list.Add(ServiceType.ItFunction);
                    list.Add(ServiceType.ItPrice);
                    break;
                case OfferingCategoryConstants.InvestmentId: // 投资平台  [OfferingCategories].Id = 1
                    list.Add(ServiceType.InvestmentBasicInfo);
                    //list.Add(ServiceType.InvestmentP2B);
                    //list.Add(ServiceType.InvestmentP2BImageInfo);
                    //list.Add(ServiceType.InvestmentPrivateEquity);
                    //list.Add(ServiceType.InvestmentPrivateEquityImageInfo);
                    break;
                case OfferingCategoryConstants.FinacingId:// 融资平台  [OfferingCategories].Id = 2
                    list.Add(ServiceType.FinancingBasicInfo);
                    list.Add(ServiceType.FinancingAdventage);
                    list.Add(ServiceType.FinancingMaterial);
                    list.Add(ServiceType.FinancingExtInfo);
                    list.Add(ServiceType.FinancingImageInfo);
                    //list.Add(ServiceType.AccountsReceivables);
                    //list.Add(ServiceType.HousePropertys);
                    //list.Add(ServiceType.Equipments);
                    //list.Add(ServiceType.FinishedProducts);
                    //list.Add(ServiceType.LetterOfCredits);
                    //list.Add(ServiceType.TradeAcceptances);
                    //list.Add(ServiceType.BankAcceptances);
                    //list.Add(ServiceType.FianacingOthers);
                    break;
                case OfferingCategoryConstants.MallId:// B2B赊销商城  [OfferingCategories].Id = 3
                    list.Add(ServiceType.SupplyingBasicInfo);
                    list.Add(ServiceType.SupplyingSpecification);
                    list.Add(ServiceType.SupplyingExtInfo);
                    list.Add(ServiceType.SupplyingImageInfo);
                    list.Add(ServiceType.SupplyingAdventage);
                    break;
                case OfferingCategoryConstants.PurchaseId:// B2B采购需求  [OfferingCategories].Id = 4
                    list.Add(ServiceType.PurchasingBasicInfo);
                    list.Add(ServiceType.PurchasingSpecification);
                    list.Add(ServiceType.PurchasingExtInfo);
                    list.Add(ServiceType.PurchasingImageInfo);
                    break;
                case OfferingCategoryConstants.ItServiceId:// 企业信息服务  [OfferingCategories].Id = 5
                    list.Add(ServiceType.ItBasicInfo);
                    list.Add(ServiceType.ItFunction);
                    list.Add(ServiceType.ItPrice);
                    break;
            }

            return list;
        }
        /// <summary>
        /// 获取不同抵押物的融资产品的ServiceType
        ///     备注：各个抵押物不同，有其独自的Service
        /// </summary>
        /// <param name="collateralType">融资抵押物类型</param>
        /// <returns></returns>
        public static List<ServiceType> GetServiceTypesByCollateralType(Framework.Base.FinancingCollateralType collateralType)
        {
            var list = new List<ServiceType>();
            list.Add(ServiceType.FinancingBasicInfo);
            list.Add(ServiceType.FinancingAdventage);
            list.Add(ServiceType.FinancingMaterial);
            //list.Add(ServiceType.FinancingExtInfo);
            list.Add(ServiceType.FinancingImageInfo);

            switch (collateralType)
            {
                case Framework.Base.FinancingCollateralType.AccountsReceivable: // 应收账款
                    list.Add(ServiceType.AccountsReceivables);
                    break;
                case Framework.Base.FinancingCollateralType.HouseProperty:// 房产
                    list.Add(ServiceType.HousePropertys);
                    break;
                case Framework.Base.FinancingCollateralType.Equipment:// 设备
                    list.Add(ServiceType.Equipments);
                    break;
                case Framework.Base.FinancingCollateralType.FinishedProduct:// 产成品
                    list.Add(ServiceType.FinishedProducts);
                    break;
                case Framework.Base.FinancingCollateralType.LetterOfCredit:// 信用证
                    list.Add(ServiceType.LetterOfCredits);
                    break;
                case Framework.Base.FinancingCollateralType.TradeAcceptance:// 商业承兑汇票
                    list.Add(ServiceType.TradeAcceptances);
                    break;
                case Framework.Base.FinancingCollateralType.BankAcceptance:// 银行承兑汇票
                    list.Add(ServiceType.BankAcceptances);
                    break;
                case Framework.Base.FinancingCollateralType.Others:// 其他
                    list.Add(ServiceType.FianacingOthers);
                    break;
            }

            return list;
        }
        #endregion

        /// <summary>
        /// 不能删除 融资性产品中-公用的抵押物基础资料的相关Service
        /// </summary>
        public static List<int> NoContainServiceIds
        {
            get { return new List<int>{ 1, 2, 3, 4, 5, 6, 7 };}
        }
    }
}
